package com.suyang.syt.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.suyang.syt.dao.interfaces.WeixinMsgReplyDao;
import com.suyang.syt.model.WeixinMsgReply;

@Repository
public class WeixinMsgReplyDaoImpl extends BaseDaoImpl<WeixinMsgReply> implements WeixinMsgReplyDao {

	@Override
	public WeixinMsgReply getReplyMsg(String sendMsg) {
		String hql = " from WeixinMsgReply where sendMsg=? ";
		List<WeixinMsgReply> list = this.list(hql, sendMsg);
		if (list != null && list.size() == 1) {
			return list.get(0);
		}
		return null;
	}

	@Override
	public void deletes(String ids) {
		String hql = " delete from WeixinMsgReply where id in(" + ids + ")";
		this.executeByHql(hql);
	}

}
